package mystudy;

public class Test {
    public static void main(String[] args) {
        System.out.println(Season.SPRING.compareTo(Season.SUMMER));//-1
        System.out.println(Season.SPRING.compareTo(Season.AUTUMN));//-2
        System.out.println(Season.SPRING.compareTo(Season.WINTER));//-3
        System.out.println(Season.WINTER.compareTo(Season.SPRING));//3
    }
}

enum Season {
    SPRING("春天", "万物复苏"), SUMMER("夏天", "天气炎炎"),
    AUTUMN("秋天", "心中凉爽"), WINTER("冬天", "万物沉睡");

    //属性
    private String name;
    private String describe;

    //构造器
    private Season(String name, String describe) {
        this.name = name;
        this.describe = describe;
    }
}